<?php 
if($p == ""){
redirect(domain."/siteadmin/?p=streams");
}
	?>

<?php if ($p == 'fms'){?>
<div class="inner">
                <div id="home">
                <h3>Server Address:<?php echo fmsip;?><br>User Name:<?php echo fmsuser;?><br>Password:<?php echo fmspass;?><br></h3>
                
<object width="900" height="600" align="middle" id="fms_adminConsole" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
				<param value="swfs/fms_adminConsole.swf" name="movie">
				<param value="high" name="quality">
				<param value="#ffffff" name="bgcolor">
				<param value="true" name="play">
				<param value="true" name="loop">
				<param value="window" name="wmode">
				<param value="showall" name="scale">
				<param value="true" name="menu">

				<param value="false" name="devicefont">
				<param value="" name="salign">
				<param value="sameDomain" name="allowScriptAccess">
				<!--[if !IE]>-->
				<object width="900" height="600" data="swfs/fms_adminConsole.swf" type="application/x-shockwave-flash">
					<param value="swfs/fms_adminConsole.swf" name="movie">
					<param value="high" name="quality">
					<param value="#ffffff" name="bgcolor">
					<param value="true" name="play">

					<param value="true" name="loop">
					<param value="window" name="wmode">
					<param value="showall" name="scale">
					<param value="true" name="menu">
					<param value="false" name="devicefont">
					<param value="" name="salign">
					<param value="sameDomain" name="allowScriptAccess">
				<!--<![endif]-->
					<a href="http://www.adobe.com/go/getflash">

						<img alt="Get Adobe Flash player" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif">
					</a>
				<!--[if !IE]>-->
				</object>
				<!--<![endif]-->
			</object>
            </div></div></div>

<?php }?>
<?php if ($p == 'edit'){?>
<div class="inner">
                <div id="home">
     
    <div class="main">
<?php writefile(abspath."/content/config/$id");


$readdata = readfile_(abspath."/content/config/$id.php");



?>
<form action="" method="post">
<div class="left-text">Insert Content</div>
<div class="right-input">
<textarea type="text" name="pinad" class="inputreg" rows="30"/><?php echo htmlentities(stripslashes($readdata), ENT_QUOTES, "UTF-8")?></textarea>
<div class="left-text">&nbsp;</div><div class="right-input"><input type="submit" class="button" name="updatead" value="Update Content" /></div>

</form>
</div><div class="clear"></div></div></div></div>
<?php }?>

<?php if ($p == 'content'){?>
<div class="inner">
                <div id="home">
    
    
    <div class="main">

<?php include_once('content.php');?>
</div></div></div>

<?php }?>


<?php if ($p == 'admin1'){?>
<div class="container-input">
<div class="heading-terms">Admin 1  Ad</div>
</div>

<?php writefile(abspath."/content/config/admin1.php");
$readdata = readfile_(abspath."/content/config/admin1.php");


?>

<form action="" method="post">
<div class="left-text">Insert Ad Code</div>
<div class="right-input">
<input type="text" name="pinad" class="inputreg" value="<?php echo htmlentities(stripslashes($readdata), ENT_QUOTES, "UTF-8")?>"/>
<div class="left-text">&nbsp;</div><div class="right-input"><input type="submit" class="button" name="updatead" value="Update Ad" /></div>

</form>
</div></div></div>


<?php }?>



<?php if ($p == 'admin2'){?>
<div class="container-input">
<div class="heading-terms">Admin 2  Ad</div>
</div>

<?php writefile(abspath."/content/config/admin2.php");
$readdata = readfile_(abspath."/content/config/admin2.php");



?>
<form action="" method="post">
<div class="left-text">Insert Ad Code</div>
<div class="right-input">
<input type="text" name="pinad" class="inputreg" value="<?php echo htmlentities(stripslashes($readdata), ENT_QUOTES, "UTF-8")?>"/>
<div class="left-text">&nbsp;</div><div class="right-input"><input type="submit" class="button" name="updatead" value="Update Ad" /></div>

</form>
</div>
<?php }?>



<?php if ($p == 'streams' || $p == 's_activate' || $p == 's_suspend' ){?>
<div class="inner">
                <div id="home">
    
    
    <div class="main">

<div class="container-input">
<div class="login-left"><b>Stream</b></div><div class="login-left"><b>Date</b></div><div class="login-viewers"><b>Viewers</b></div><div class="login-viewers"><b>Action</b></div><div class="login-viewers"><b>Status</b></div>
<?php 

if($p == 's_activate'){updatestream(1,$id);}
if($p == 's_suspend'){updatestream(0,$id);}
streamlist();

?>
</div><div class="clear"></div></div></div></div>


<?php }?>



</div>


